package com.gurun.codes.business.common_alarm;

import android.content.Context;

import com.gurun.codes.contract.base.BaseAlarmListPresenter;
import com.gurun.codes.contract.base.view.RxView;
import com.gurun.model.bean.common.GetDeviceAlarmInfoListResultBean;

public interface CommonAlarmActivityContract {

    interface CommonAlarmActivityView extends RxView {

        void onLoading();

        void onLoaded(GetDeviceAlarmInfoListResultBean datas);

        void onError(String msg);

        void onComplete();

        void resetListDatas();
    }

    class CommonAlarmActivityViewPresenter extends BaseAlarmListPresenter<CommonAlarmActivityView> {

        public CommonAlarmActivityViewPresenter(Context context) {
            this.mContext = context;
        }


        @Override
        protected void onMLoading() {
            getView().onLoading();
        }

        @Override
        protected void onMLoaded(GetDeviceAlarmInfoListResultBean datas) {
            getView().onLoaded(datas);
        }

        @Override
        protected void onMError(String msg) {
            getView().onError(msg);
        }

        @Override
        protected void onMComplete() {
            getView().onComplete();
        }

        @Override
        protected void mResetListDatas() {
            getView().resetListDatas();
        }
    }

}
